<%--
  Created by IntelliJ IDEA.
  User: 86135
  Date: 2023/3/28
  Time: 22:04
  To change this template use File | Settings | File Templates.
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>查看与归还</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- 引入 Bootstrap -->
  <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  <style>
    body{
      background-image: url("${pageContext.request.contextPath}/statics/images/bg.png");
    }
  </style>
</head>
<body>

<div class="container">

  <div class="row clearfix">
    <div class="col-md-12 column">
      <div class="page-header">
        <h1>
          <small>${username} 的借书详情</small>
          <button class="btn btn-primary" onclick="history.back()" style="float: right;">返回</button>
        </h1>
      </div>
    </div>
  </div>

  <div class="row clearfix">
    <div class="col-md-12 column">
      <table class="table table-hover table-striped">
        <thead>
        <tr>
          <th>书籍图片</th>
          <th>书籍名字</th>
          <th>起借时间</th>
          <th>剩余时长</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="borrow" items="${requestScope.get('borrowList')}">
          <tr>
            <td><img src="${pageContext.request.contextPath}/book/readPhoto?bookISBN=${borrow.getBookISBN()}" width="40px" height="40px"></td>
            <td>${borrow.getBookName()}</td>
            <td>${borrow.getTimeStart()}</td>
            <td>${borrow.getLength()}</td>
            <td>
              <a href="${pageContext.request.contextPath}/user/backBook?bookISBN=${borrow.getBookISBN()}">归还</a>
            </td>
          </tr>
        </c:forEach>
        </tbody>
      </table>
    </div>
  </div>
</div>

